package com.xmb.common.service.wx;

import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.xmb.common.entity.XmbWechatPaymentOrder;
import org.apache.rocketmq.common.message.Message;

/**
 * Created by lyndon on 2019/3/27.
 * 微信支付成功通知
 */
public interface WxPayNotifyService {


    void payNotify (String xmlData) throws WxPayException;

    XmbWechatPaymentOrder updateWechatPaymentOrder (WxPayOrderNotifyResult notifyResult);

    /**
     * 获取通知业务系统的消息
     * @param wechatPaymentOrder
     */
    Message getNotifyBusinessMsg(XmbWechatPaymentOrder wechatPaymentOrder);

    /**
     *  获取需要延迟检查的消息
     * @param wechatPaymentOrder
     */
    Message getDelayCheckMsg (XmbWechatPaymentOrder wechatPaymentOrder);

    /**
     * 发送消息
     * @param sendMsg
     */
    void sendMsg(Message sendMsg);

}
